
<h2>Account</h2>

<form>
    <fieldset>
        <legend>Profile</legend>

        <label>
            <span>Name:</span>
            <input type="text" name="name" ng-model="user.name"/>
        </label>

        <label>
            <span>Email:</span>
            <input type="text" name="name" ng-model="user.email"/>
        </label>
    </fieldset>

    <fieldset>
        <legend>Change Password</legend>

        <label>
            <span>Old Password:</span>
            <input type="password" ng-keypress="reset()" ng-model="oldpass"/>
        </label>

        <label>
            <span>New Password:</span>
            <input type="password" ng-keypress="reset()" ng-model="newpass"/>
        </label>

        <label>
            <span>Confirm Password:</span>
            <input type="password" ng-keypress="reset()" ng-model="confirm"/>
        </label>

        <button ng-click="updatePassword()">update password</button>

        <p class="error" ng-show="err">{{err}}</p>
        <p class="good" ng-show="msg">{{msg}}</p>
    </fieldset>
</form>

<button ng-click="logout()">Log Out</button>